<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 

global $g4;
$table = $this->bo_table;

?>


<div class=todo>

<div class=insert>
    <a href="javascript:insertTODO('<?=$table?>');">
        <img src='<?=$this->classPath?>/img/TodoList/insert.gif'>
    </a>
    <INPUT id=todo type='text' size='26' />
</div>

<div id='todoList'>

<ul>
<?
// 진행중인 목록
for($i=0; $i<count($this->list); $i++) {
    if($this->list[$i][wr_link2] != 'complete') {
        $subject = addslashes($this->list[$i][wr_subject]);
?>
        <li id='<?=$this->bo_table.$this->list[$i][wr_id]?>'>

        <a class=button href="javascript:completeTODO('<?=$table?>',<?=$this->list[$i][wr_id]?>,'<?=$subject?>');" >
            <img src='<?=$this->classPath?>/img/TodoList/complete.gif'>
        </a>
        <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$table?>&wr_id=<?=$this->list[$i][wr_id]?>'><?=$this->list[$i][wr_subject]?></a>
        </li>
<?
    }

}


// 완료된 목록
for($i=0; $i<count($this->list); $i++) {
    if($this->list[$i][wr_link2] == 'complete') {
        $subject = addslashes($this->list[$i][wr_subject]);
?>
        <li id='<?=$this->bo_table.$this->list[$i][wr_id]?>'>
        <a class=button href="javascript:unlistTODO('<?=$table?>',<?=$this->list[$i][wr_id]?>,'<?=$subject?>');">
            <img src='<?=$this->classPath?>/img/TodoList/complete.gif'>
        </a>
        <a class=complete href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$table?>&wr_id=<?=$this->list[$i][wr_id]?>'><?=$this->list[$i][wr_subject]?></a>
<?
    }
}
?>
</ul>

</div><!-- todoList -->

</div><!-- todo -->